home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / dea001.zip / DEA.DOC < prev    next >
Text File  |  1993-04-13  |  15KB  |  317 lines

  1.                          The Data Encryption Algorithm
  2.                                   DEA V. 1.00
  3.                       Public Shareware Evaluation Release
  4.                                  Documentation
  5.                          Copyright 1993 by V. Sadowsky
  6. ------------------------------------------------------------------------------
  7.  
  8.  
  9. HISTORICAL OVERVIEW
  10.  
  11.      The DEA encryption algorithm was designed over the course of 14 months.  It
  12. has its roots in Number Theory.  In particular, I had observed some peculiar and
  13. interesting features of PERIODIC DECIMALS.  The DEA is the result of my desire
  14. to create an encryption algorithm based on this property of fractions with a
  15. prime divisor.  This should not be surprising because there exist numerous
  16. examples in the literature of encryption algorithms based on the mathematical
  17. properties of various equations.  Some noteworthy examples are: the RSA,
  18. discrete exponentiation, and the Knapsack problem (solved).
  19.  
  20.      I had been looking around for some time for a method of generating the
  21. elusive ONE-TIME-PAD.  That, is, a random bit stream.  But the problem was that
  22. most computer generated numbers were in fact not random, but PSEUDOrandom.  I
  23. knew that reliance on pseudorandomness was wasted effort.  How then could I
  24. generate a random bitstream based on a mathematically precise algorithm?
  25.  
  26.      The answer lay in a BYTE Magazine article I had read some years earlier
  27. where the authors made the point that ALL decimal expansions of rational
  28. fractions repeat themselves in a cyclical manner.  They had developed a program
  29. to compute the decimal period, as it is known.  I was later to discover that one
  30. of their cited examples was a composite number (their divisor) and thus had a
  31. relatively short cycle of repetition.  However, because they did not have all
  32. the facts of the matter, they proclaimed that they had not found the divisor
  33. 99,993 to repeat in their tests.  They knew that it must eventually repeat, but
  34. I suppose they had no idea of whether its length was less than, or more than
  35. 99,993.  The decimal period of this divisor, is, of course, much less than
  36. 99,993.  However, herein lay the germ of the idea to employ fractions in the
  37. production of the ONE-TIME-PAD random bit-stream for a cryptographic algorithm.
  38.  
  39.      The DEA uses the one-time-pad technique outlined above, but it also goes
  40. several steps beyond.  First, the DEA generates what I shall call, for lack of a
  41. better term, Sadowsky Fractions.  A Sadowsky Fraction is a series of unrelated
  42. fractions starting with a Defined Fraction such as 117 / 22,307.  Now, the prime
  43. divisor 22,307 has a decimal period of 11,153 quotient digits.  If, during the
  44. long division of 117 by 22,307 we add the quotient digit to BOTH the numerator
  45. AND the residue, then we will be producing Sadowsky Fractions.  Let's look at
  46. this more mathematically:
  47.                           Let the quotient digits 225806451...continued
  48.                           represent the REAL decimal period of the rational
  49.                           fraction 7 / 31.
  50. Now, let's simply define a new fraction 5,307 / 22,307 (EQU. ->0.237907383...
  51. And now, Sadowsky Fractions will produce:
  52.  
  53.     53070 / 22307  Q = 2   residue = 8456
  54.                                           8456 + 2 = 8458
  55.                                           8458 * 10 = 84580
  56.    84580 / 22309   Q = 3   residue = 17653
  57.                                            17653 + 2 = 17655
  58.                                            17655 * 10 = 176550
  59.    176550 / 22311   Q = 7  residue = 20373
  60.                                            20373 + 5 = 20378
  61.                                            20378 * 10 = 203780
  62.    203780 / 22316   Q = 9  residue = 2936
  63.                                            2936 + 8 = 2944
  64.                                            2944 * 10 = 29440
  65.    29440 / 22324    Q = 1  residue = 7116
  66.                                            etc.
  67.                                            etc.
  68.    etc.
  69.  
  70. Observe how the original REAL decimal period of 237907383 is now permuted into:
  71.                                                 23791.... etc.
  72.  
  73. Our new decimal period no longer corresponds to one modulus, but to five (5), in
  74. our limited example.  Thus Sadowsky Fractions are fractions wherein the long
  75. division process both the residue and the modulus are affected by addition of
  76. 'random quotient noise' from another real, or imaginary decimal period.  We may
  77. think of the above example 23791... as the 'imaginary' decimal period.  In one
  78. stroke, we have a method for producing a one-time-pad, AND a precise
  79. mathematical permutation.  The exact degree of permutation depends on the
  80. fractions used and the decimal periods.  In the example, differentation occurrs
  81. only after five division steps.  This length varies, and thereafter, the
  82. differentation becomes very pronounced.  The length of a Sadowsky decimal period
  83. is dependent upon the length of the 'feed' digits.  If we have 11,153 digits of
  84. PI, or square root 2, or some other source of quotients, we may use that as a
  85. feed to a defined fraction, which will in turn, spawn that many Sadowsky
  86. Fractions.  Secondly, the DEA employs ten (10) defined fractions intended to
  87. spawn as many Sadowsky Fractions as necessary to process one of ten input file
  88. blocks.
  89.  
  90.  
  91.  
  92.  
  93.  MOTIVATION FOR CREATING THE DATA ENCRYPTION ALGORITHM
  94.  
  95.  
  96.      The motivation for this project was based on five factors as follows:
  97.  
  98. o  my desire to create an encryption algorithm based within the framework of   
  99.    periodic decimals
  100.  
  101. o  the fact that the industry's Data Encryption Standard algorithm (DES)
  102.    was found in numerous software packages and the fact that DES, while it
  103.    is a brilliant achievment!!, is now outdated and the subject of attainable
  104.    brute-force key attacks
  105.  
  106. o  many software encryption methods not using the DES, were based on very
  107.    simple ideas, such as, using a simple secret alphanumeric key.  Some were
  108.    so rudimentary that they should not take space on a floppy disk!!
  109.  
  110. o  my need to be different and design an algorithm which would withstand both
  111.    exhaustive key and ciphertext attacks
  112.  
  113. o  need to to be creative and perhaps, enrich and infuse some creativity into   
  114.    the literature and maybe, show how the one-time-pad technique may be 
  115.    implemented
  116.  
  117.  
  118.  
  119. DIFFERENCES AND FEATURES WITH REGARD TO OTHER ENCRYPTION ALGORITHMS
  120.  
  121.  
  122.      The major differences between the DEA and other systems is outlined below:
  123.  
  124. o  uses the one-time-pad method
  125. o  uses a 240-byte key containing 20 fractions along with quotient select
  126.    digit info. and byte XOR number
  127. o  uses only bit XOR manipulations to produce the cipher byte
  128. o  there is no brute-force method of extracting the user's key(s)
  129. o  the original message (in-file) is not expanded in any manner
  130. o  keys are not stored within the ciphertext
  131. o  encryption and decryption accomplished in one code section, not two
  132.  
  133.  
  134.  
  135. THE DEA KEY STRUCTURE
  136.  
  137.  
  138.      The DEA key structure is totally different from any other system in that it
  139. uses fractions, 20 of them, along with other information (as noted above).  This
  140. makes them both impossible to determine if unauthorized, but also difficult, if
  141. not impossible to memorize.  They are also somewhat tedious to create.
  142.  
  143.      Fortunately, DEA keys may be saved to a disk file and retrieved at any
  144. later date when it is desired to use that same key again.
  145.  
  146.      One important feature of the DEA key design is that the DEA key is designed
  147. to be used frequently.  The design of the key makes it a 100 per cent fruitless
  148. expenditure of effort in attacking the DEA key itself.  It is NOT subject to
  149. brute-force attacks, as with many encryption systems, regardless of complexity,
  150. that employ one or more alphanumeric keys.  Note that using the same key
  151. frequently and for a long time, is breaking a golden rule in cryptography. 
  152. However, it does not concern the DEA user.
  153.  
  154.      Since the DEA divides the input file into ten blocks, there are ten DEA
  155. keys.  Each key contains a fraction to generate a REAL decimal period, and a
  156. defined fraction designed to generate a series of Sadowsky Fractions.  The very
  157. most that one could possibly decipher without all ten keys (assume one DEA key
  158. is correct), is ONE BYTE, AND THIS IS ONLY POSSIBLE (IF) THE ASSUMED KEY IS
  159. INDEED THE FIRST DEA KEY.  This is because ALL DEA keys are very heavily
  160. integrated with oneanother.
  161.  
  162.      The only real hassle with DEA keys is inputting all the required numbers. 
  163. Once this is done, all DEA keys are saved.  Using the DEA with say, 10 or more
  164. keys on file, makes the DEA very user friendly, and easier to use than most file
  165. encryption programs I have tested.
  166.  
  167.      The XOR number is a critical component of the DEA key.  This value
  168. specifies how many bit XOR are to be performed.  This value should be larger
  169. than 15 and less than 50.  The larger the better, since larger values will
  170. involve much more bit manipulation.
  171.  
  172.  
  173.  
  174. DEA DO'S AND DONT'S
  175.  
  176.  
  177.      This section will outline several aspects of using the DEA software
  178. program.
  179.  
  180.      DON'T
  181. --------------
  182.   o  Enter ALL mandatory information as requested by the program, especially
  183.      if entering a new DEA key
  184.  
  185.   o  NEVER (!!!) enter a numerator greater than the divisor.  All numerators
  186.      MUST BE SMALLER THAN DIVISORS
  187.  
  188.   o  Don't enter the same set of numbers, either numerators, divisors, or
  189.      prime divisors
  190.  
  191.   o  Do not enter the name "DEA.OUT" as a filename for DEA to process.  Since
  192.      "DEA.OUT" will also be the output filename, this conflict will result in
  193.      MS-DOS (R) file errors and errenous decryption!!
  194.  
  195.   o  DON'T lose your DEA.KEY file, it contains YOUR secrets!!  REMEMBER, DEA
  196.      keys are a pain to set-up, so don't mess with this file!!!  The file
  197.      grows in multiples of 240 bytes with the addition of new keys.
  198.  
  199.  
  200.      DO
  201. --------------
  202.   o  the output filename of the DEA program is named "DEA.OUT", ALWAYS RENAME
  203.      this file ONLY IF IT IS A DEA ENCRYPTED FILE.  You do not need to rename
  204.      the file if it is decrypted.  If it's encrypted, it is assumed that some
  205.      time later, you will want to decrypt it, at that time, its name MUST be
  206.      something OTHER THAN "DEA.OUT".
  207.  
  208.   o  make a habit a introducing 'distance' between the numbers you enter as
  209.      fractions.  For example, for key 1 you could enter a small prime divisor
  210.      and then a large denominator for the defined fraction.  Experiment a bit!
  211.  
  212.   o  if you have several DEA keys on file, you will have to remember which
  213.      DEA key was used with a particular file.  Otherwise you would have to 
  214.      try all of them until one of them produced a readable or runable output.
  215.  
  216.   o  As with any encryption algorithm, compression and encryption are related
  217.      in that both deal with entropy, compression attempts to decrease the
  218.      entropy (redundancy), and encryption is designed to increase the entropy
  219.      (the randomness, disorder).
  220.      You can save time and space by, for example, compressing all source
  221.      files into an archive, THEN encrypting them.  When you want to get your
  222.      files back, you must decrypt FIRST, then use your favourite compression
  223.      program.  Make sure you change the file name of DEA.OUT to say, DEA.ARJ,
  224.      or DEA.LZH, or DEA.ZIP.
  225.      Compression is convenient and logical for some business environments.
  226.  
  227.  
  228.  
  229. THE DEA OUTPUT FILES
  230.  
  231.  
  232.      The DEA program will open several files IN THE DEFAULT DIRECTORY.  These
  233. files are:
  234.  
  235.            DEA.OUT       * standard DEA output file
  236.            DEA.KEY       * DEA key file   **** TAKE GOOD CARE OF THIS ****
  237.            DEA.Q1        * first quotient file   850 bytes
  238.            DEA.Q2        * second quotient file  850 bytes
  239.            DEA.PIF       * DEA program info. file   -dbg.- version
  240.            DEA.ADR       * DEA random addresses     -dbg.- version
  241.  
  242. The last two files are only produced by the DEA debug version.  This version of
  243. the DEA program runs more slowly than the non-debug version because it has two
  244. more files to write.  Further, these two files, can become quite LARGE!!
  245.  
  246. Unless you are testing the DEA cryptographically, it is recommended that only
  247. the non-debug version be used as it is much faster.
  248.  
  249.  
  250.  
  251. DEA ENCRYPTION AND DECRYPTION
  252.  
  253.  
  254.      The DEA does not use the traditional -e / -d flags, instead, the DEA goes
  255. its merry way using the specified key and either encrypts or decrypts the
  256. indicated file.  The user must know what he / she is doing with a file.  Thus,
  257. if the file is encrypted, running it through the DEA with the SAME key, will
  258. decrypt it.
  259.  
  260.  
  261.  
  262. FURTHER NOTES
  263.  
  264.  
  265.      The DEA never uses the same pieces of key information twice.  Every input
  266. byte generates a unique one-time-pad of 850 digits.
  267.  
  268.      The DEA is not a self-synchronizing cipher; if bits are altered in a DEA
  269. encrypted file, then upon decryption, only those bytes will be errenous.
  270.  
  271.      The DEA is a stream cipher.
  272.  
  273.  
  274.  
  275. DEA SECURITY
  276.  
  277.  
  278.      The most unique aspect of the DEA is its key structure, and this structure
  279. naturally emerged from the design framework.  The security of the DEA is,
  280. therefore, solid from the key perspective.  However, from the ciphertext
  281. perspective, this solidity may be less than 100%.  The best and most effective
  282. test of a cipher is  t i m e.  However, this document was written to provide an
  283. overview and provide general guidelines for using the software correctly so that
  284. it could, hopefully, be given a fair trial run to determine its strengths and
  285. weaknesses.
  286.  
  287.      Please understand that I am not a professional cryptographer, just a fellow
  288. with a long interest in data encryption techniques.  This is why I am not
  289. qualified to determine fully the security of the DEA design.
  290.  
  291.  
  292.  
  293. PURPOSE OF PUBLIC SHAREWARE EVALUATION RELEASE
  294.  
  295.  
  296.      The purpose of releasing this software is mainly for testing; I am hoping
  297. that it will be widely distributed and will come into the hands of people
  298. qualified in the field of cryptography who will undertake to study the DEA
  299. design further, and hopefully report back to me.
  300.  
  301.      While this document does not cover all aspects of the DEA design, it is a
  302. general overview; I will attempt to answer all correspondences.
  303.  
  304.      I encourage your distribution of this software and welcome all questions
  305. and comments regarding the DEA and its design innards.
  306.  
  307.                       send comments, money, questions to:
  308.                                        
  309.                                   V. Sadowsky
  310.                                   33 Isabella St. Ste. 1005
  311.                                   Toronto, Ontario
  312.                                   M4Y 2P7
  313.                                   Canada
  314.  
  315. ------------------------------ End DEA.DOC -----------------------------------
  316.  
  317.